import * as React from "react";
import Spinner from "react-native-loading-spinner-overlay";

interface Props extends React.Props<any> {
  isSpinnerVisible: boolean;
}

export default class Loading extends React.Component<Props> {
  constructor(props: Props) {
    super(props);
  }

  render() {
    return (
      <Spinner
        visible={this.props.isSpinnerVisible}
        textContent={"正在加载..."}
        textStyle={{ color: "#FFF" }}
        animation="fade"
      />
    );
  }
}
